const Home = () => import('@/views/home/Home')
const Center = () => import('@/views/center/Center')
const UserAdd = () => import('@/views/user/UserAdd')
const UserList = () => import('@/views/user/UserList')
const NewsAdd = () => import('@/views/news/NewsAdd')
const NewsList = () => import('@/views/news/NewsList')
const ProductAdd = () => import('@/views/product/ProductAdd')
const ProductList = () => import('@/views/product/ProductList')
const NotFound = () => import('@/views/notfound/NotFound')

const routerConfig = [
  {
    path: '/index',
    component: Home
  },
  {
    path: '/center',
    component: Center
  },
  {
    path: '/user/useradd',
    component: UserAdd
  },
  {
    path: '/user/userlist',
    component: UserList
  },
  {
    path: '/news/newsadd',
    component: NewsAdd
  },
  {
    path: '/news/newslist',
    component: NewsList
  },
  {
    path: '/product/productadd',
    component: ProductAdd
  },
  {
    path: '/product/productlist',
    component: ProductList
  },
  {
    path: '/',
    redirect: '/index'
  },
  {
    path: '/:pathMatch(.*)*',
    name: 'notfound',
    component: NotFound
  }
]

export default routerConfig
